1. Field of the Invention
The present invention relates to an information storage method for storing in a memory pieces of information stored in an information storage part in association with identification codes in an order opposite to that of an arrangement of key elements having the identification codes.
2. Description of the Prior Art
An information storage system of this type serves to store pieces of name information of persons assigned reserved seats of for example a streetcar or a bus, etc., in particular name information for each reserved seat number in an information storage part through keyed inputting operation, and to read information on the names from the rear side of the reserved seats together with the numbers of the reserved seats, or serves to store information on proceeds, etc. in an account book at each date with keyed inputting operation, and to successively read them in the order of the date and store the read information in a memory. Furthermore, the information storage system is employed for stock control wherein pieces of information of articles arranged at prescribed positions are stored with key operation and read with the opposite procedures to storing them.
Referring here to FIGS. 4 and 5, a prior information storage system will be described.
In the figures, designated at 1 is an information storage part, which part includes information storage areas 2, 3, 4, and 5 each having identification numbers 120, 130, 010, and 250 as identification codes K different in the order of arrangement thereof from each other. The information storage areas 2, 3, 4, and 5 are adapted to store desired informations A1 to A4 corresponding to the identification codes K. For example, it may be assumed that the identification numbers described above are selected as reserved seat numbers in a streetcar or a bus, etc., and the various informations A1 to A4 are the names of persons corresponding to the reserved seat numbers. Or, the identification number may be assumed to be dates, and the informations A1 to A4 to be proceeds corresponding to the dates. Such identification codes K and informations A1 to A4 are stored in the information storage part 1 as a memory means with use of a key input means and a display device. A data input device for input operation is already known.
Designated at 6 is an indexed part such as a memory means in which key elements 9 to 12 including identification numbers 010, 120, 130, 250 as the identification codes K are arranged in a prescribed direction (left to right in the figure) after which the pieces of information A1 to A4 are key-inputted into the information storage part 1. Also in this case, the key input means and the display (not shown) are employed to effect key input operation for the key elements. Thereupon, it is limited in view of read/write capability to subject in succession the key elements 9 to 12 to the key operation laterally. Consequently, the key elements 9 to 12 are divided into blocks 7, 8 for each prescribed number of the key elements. Since the block 7 includes key elements disposed ahead, in the sequence of key elements, of those involved in the block 8, the block 7 becomes a front block with respect to the block 8, while the block 8 becomes a rear block with respect to the block 7. Block decision areas (hereinafter referred to as a header) are provided in the blocks 7, 8, which areas have rear stage block specifying parts 15, 16 for specifying in which respective blocks identification numbers following the last identification numbers 120, 250 of the respective blocks 7, 8 are existent. In this case, information for specifying the block 8 is stored in the rear stage block specifying part 15 of the block 7, while information for specifying a further rear stage block (not shown) behind the block 8 is stored in the rear stage block specifying part 16 of the block 8.
The key elements 9, 10, 11, and 12 described above have length indication parts 19, 20, 21, and 22 for specifying the lengths of the key elements themselves and are required for finding positions of the next key elements in the blocks 7, 8. For example, retrieving the indication part 19 of the key element 9, the length of the key element 9 is found. Consequently, after retrieving the key element 9 in an amount corresponding to the length of the key element 9, head data of the next key element 10 can be found. Moreover, the key elements 9, 10, 11, and 12 have position indication parts 23, 24, 25, and 26 for indicating at which addresses respective corresponding informations A1 to A4 are located in the information storage part 1. Prescribed information is entered in these length indication parts and the position indication parts in preparing the key elements 9 to 12. Furthermore, designated at 27 is a memory having a plurality of information storage areas 28, 29, 30, and 31.
Designated at 32 is a controller which stores in the memory 27 informations from the information storage part 1 in the order of arrangement of the identification numbers 010, 120, 130 and 250 based on instructions from the indexed part 6 described above. Namely, the controller 32 includes an element read means 32b operated based on an input from a forward read setting means 32a such as a switch, etc., for retrieving the blocks 7, 8 in the order of the arrangement of the key elements, i.e., from the left to the right in the figure, and for thereby reading the key elements 9 to 12 and delivering them to the memory 27, and a block indication means 32c for reading the rear stage block specifying parts 15, 16 after the element read means 32b finishes reading the key elements in each block, and for indicating to the element read means 32b the next block. Moreover the element read means 32b, after reading the respective key elements 9 to 12, detects, from the position indication parts 23 to 26, at which position in the information storage part 1 an identification number for each key element is located, and reads the identification numbers, i.e., corresponding identification codes k and the informations A1 to A4 from the information storage part 1 for storing them in the memory. Consequently, once the element read means 32b reads all the key elements 9, 10 of the block 7, for example, the block specifying means 32c reads the information of the rear stage block specifying part 15. Since the block 8 has been specified in the rear stage block specifying part 15, the block specifying means 32c instructs the element read means 32b to retrieve the block 8, and thereby the element read means 32b retrieves from the block 8 the first key element 11. For the forward read setting means 32a, a switch interlocking with a specific key on a key board is available.
Such prior information storage systems are described in for example "Electronic Computer Programming Language COBOL" JIS C 6205-1980, issued by Japanese Standard Association, and "FACOM CSP/F5" JIS COBOL E Syntax, 45SP-3102-1 published by Fujitsu Inc. These systems can call records in the increasing and decreasing orders of reference keys.
Let us here describe the whole operation of the prior information storage system described above. First, to initially enter informations in the increasing order of the identification numbers 010, 120, 130, and 250 and to then store them, the indexed part 6 is prepared while structured as shown in FIG. 4, upon preparing an indexed file. Such operation is effected with key operation while permitting an operator to observe a display. The key elements 9, 10, 11, and 12 are successively arranged in the increasing order of the identification numbers 010, 120, 130, and 250. With informations are stored in the increasing order of the identification numbers 010, 120, or 130, 250, i.e., in the arrangment order of the key elements based on the indexed file so prepared, the read setting means 32a is turned on. As a result, the forward read means 32b successively takes out the key elements 9, 10, involved in the front stage block 7 starting from the head in the block 7, i.e., from the key element 9 toward the rear key element 10 and further takes out the last key element 10 in the block 7. Therefore, the block specifying means 32c decides the rear stage block 8 from the rear stage block specifying part 15 serving to specify the block number of the rear stage block present in the header 17 and instructs the element read means 32b to retrieve the block 8. Hereby, the element read means 32b successively takes out in repetition the key elements in the block 8 starting from the head in the block 8, i.e., the key element 11 toward the rear element 12. The element read means 32b furthermore finds positions of corresponding informations A1 to A4, i.e., positions (addresses) in the information storage part 1 from the contents of the position indication parts 23, 24, 25, and 26 each time one of the key elements 9, 10, 11, and 12 is taken, and successively enters the informations A1 to A4 in the memory 27 together with the information codes. Thus, the informations are entered in the increasing order of the identification numbers 010, 120, 130, and 250.
Namely, entering the indexed file of FIG. 4 in the increasing order of the identification numbers 010, 120, 130, and 250, the informations A1 to A4 can be entered in the order of steps S1, S2, S3, and S4 of FIG. 5.
However, prior information storage systems, as described above, are adapted to retrieve information in accordance with the order of arrangement of the key elements and to store the information in the increasing order to the identification numbers 010, 120, 130, and 250, but are incapable of entering the identification numbers 010, 120, 130, and 250 in the decreasing order thereof.
In view of the drawbacks with the conventional information storage systems, it is an object of the present invention to provide an information storage system capable of storing information in the opposite direction to the arrangement the key elements including the identification codes.